In a videoconferencing communications system, video data is generally packetized using Real-time Transport Protocol (RTP) to generate an RTP data packet, and then the RTP data packet is transmitted using User Datagram Protocol (UDP). A video includes multiple picture frames. However, UDP is an unreliable transmission protocol. In a transmission process, a packet loss is likely to occur during network congestion, which affects quality of a video reconstructed at a decoder.
To resolve the foregoing problem, a redundancy picture technology may be introduced into a video data encoding process. In a video compression coding technology, each video display image is referred to as a picture. A field is obtained by scanning a picture in alternate rows, and correspondingly a picture scanned row by row may be referred to as a frame. One frame may include one or more slices, or may include one or more tiles, and a difference is that slice division is performed in an order of a basic coding unit, but tile division is performed according to a picture area. A case in which a frame is used as a processing unit is merely used as an example, which may include, in a video data encoding process, each picture frame is encoded to generate a primary frame, and at the same time generate one or more redundant frames corresponding to the primary frame, and a primary slice and a redundant slice are encapsulated into different packets for transmission. In this way, the decoder may perform decoding using the following method which includes, parsing header information of a current frame to obtain attribute information of the current frame, where the attribute information of the current frame is used to indicate whether the current frame is a primary frame or a redundant frame, and discarding the current redundant frame if the current frame is a redundant frame and a primary frame corresponding to the current frame is a normal frame (that is, a packet is not lost and data for reconstructing the frame is complete), or copying header information of the primary frame to a location of the header information of the current frame, and continuing to parse other information of the current frame in order to reconstruct a video using the redundant frame if the current frame is a redundant frame and a primary frame corresponding to the current frame is not a normal frame (that is, a packet is lost and decoding cannot be properly performed).
The foregoing decoding method requires that the primary frame be adjacent to the redundant frame corresponding to the primary frame in terms of decoding locations. A correspondence between the primary frame and the redundant frame cannot be reflected if the primary frame is not adjacent to the redundant frame corresponding to the primary frame in terms of decoding locations, which increases a possibility of losing both the primary frame and the redundant frame. In addition, the primary frame needs to arrive at the decoder before the redundant frame does, which reduces transmission flexibility.